//
//  MemberTableViewCell.m
//  OAProject
//
//  Created by yhj on 2017/3/8.
//  Copyright © 2017年 cdnunion. All rights reserved.
//

#import "MemberTableViewCell.h"

@interface MemberTableViewCell ()

// 添加人员
@property(nonatomic,strong)ImageTextButton *addMemberBtn;

// 删除人员
@property(nonatomic,strong)ImageTextButton *deleteMemberBtn;

@end

@implementation MemberTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        // ➡️Cell类型
        self.accessoryType=UITableViewCellAccessoryNone;

        self.addMemberBtn.hidden=NO;

        self.deleteMemberBtn.hidden=NO;
        
        self.backgroundColor=WhiteColor;
        
    }
    return self;
}
// addMemberBtn
-(ImageTextButton *)addMemberBtn
{
    if (!_addMemberBtn) {
        _addMemberBtn=[[ImageTextButton alloc]initWithFrame:CGRectMake(kmargin,kmargin*2,kmargin*2,kmargin*2) image:[UIImage imageNamed:@"help"] title:@"添加"];
        _addMemberBtn.buttonTitleWithImageAlignment=UIButtonTitleWithImageAlignmentUp;
        _addMemberBtn.imgTextDistance=kmargin/5;
        [self addSubview:_addMemberBtn];
//        [self.addMemberBtn mas_makeConstraints:^(MASConstraintMaker *make) {
////            make.right.mas_equalTo(-kmargin*2);
////            make.bottom.mas_equalTo(-kmargin);
//            make.left.mas_equalTo(kmargin);
//            make.centerY.mas_equalTo(self);
//            make.size.mas_equalTo(CGSizeMake(kmargin*4,kmargin*3));
//        }];

//        ViewBorderRadius(_addMemberBtn,kmargin,1,ClearColor);
//        [_addMemberBtn setTitle:@"2" forState:0];
        _addMemberBtn.titleLabel.font=Font_Number(12);
        _addMemberBtn.titleLabel.textColor=Main_Color;
        [_addMemberBtn addTarget:self action:@selector(addMemberBtnEvent) forControlEvents:UIControlEventTouchUpInside];
//    [_addMemberBtn setBackgroundColor:[UIColor colorFromHexString:@"#59acd8"]];

    }
    return _addMemberBtn;
}

-(void)addMemberBtnEvent
{


}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
